package com.dba.example.guice.web.rest;

import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.Provider;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;

@Provider
@Consumes(MediaType.WILDCARD)
@Produces(MediaType.WILDCARD)
public class ExampleJacksonJaxbJsonProvider extends JacksonJaxbJsonProvider {

	public ExampleJacksonJaxbJsonProvider() {
		super(new ObjectMapper().registerModule(new JodaModule()).registerModule(new Hibernate4Module()).configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false), DEFAULT_ANNOTATIONS);
	}

}
